package com.jmu.content.controller.admin;


import com.jmu.content.dto.OrdersPageDTO;
import com.jmu.content.result.PageResult;
import com.jmu.content.result.Result;
import com.jmu.content.service.OrdersService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fems
 * @since 2024-05-06
 */
@RestController("adminOrdersController")
@RequestMapping("/admin/orders")
public class OrdersController {

    @Autowired
    OrdersService ordersService;

    @GetMapping("/page")
    @ApiOperation("分页查询订单")
    public Result<PageResult> page(OrdersPageDTO ordersPageDTO){

        PageResult pageResult = ordersService.pageQuery(ordersPageDTO);

        return Result.success(pageResult);
    }


}

